<!DOCTYPE html>
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <script th:src="@{static/js/vue.js}"></script>
    <script th:src="@{static/js/elementUI.js}"></script>
    <script th:src="@{static/js/axios.js}"></script>
    <link th:href="@{static/css/elementUI.css}" rel="stylesheet" />
    <style>
        /*模态框*/
        .el-row {
            margin-bottom: 20px;
        &:last-child {
             margin-bottom: 0;
         }
        }
        .el-col {
            border-radius: 4px;
        }
        .bg-purple-dark {
            background: #99a9bf;
        }
        .bg-purple {
            background: #d3dce6;
        }
        .bg-purple-light {
            background: #e5e9f2;
        }
        .grid-content {
            border-radius: 4px;
            min-height: 36px;
        }
        .row-bg {
            padding: 10px 0;
            background-color: #f9fafc;
        }


        /**/
        .text {
            font-size: 15px;
        }

        .item {
            margin-bottom: 5px;
        }
        .clearfix:before,
        .clearfix:after {
            display: table;
            content: "";
        }
        .clearfix:after {
            clear: both
        }

        .box-card {
            width: 100%;
        }
        #main{
            width: 80%;
            margin: auto;
            margin-top: 10px;
        }
        #dataTable{
            margin-top: 10px;
        }
        #form{
            line-height: 60px;
        }
        #top{
            /*height: 100px;*/
            /*overflow: hidden;*/
        }
        div{
            /*border: 1px red solid;*/
        }
    </style>
</head>

<body>
<div id="top">
    <el-card class="box-card" style="background-color: #EBEEF5">
        <span style="margin-left: 9%;margin-top: 5px;background-color: #3a8ee6;font-size: 15px">&nbsp;&nbsp;</span>
        <span style="font-size: 15px;margin-left: 10px">帮助管理</span>
        <el-button style="float: right; padding: 3px 0;margin-right: 10%" type="text">刷新</el-button>
    </el-card>
</div>
<div id="main">
    <div id="form">
        <el-card class="box-card">
            <div slot="header" class="clearfix" style="height: 20px;line-height: 20px">
                <span style="font-size: 15px">筛选查询</span>
                <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
            </div>
            <div align="left">
                <el-form :inline="true" :model="formInline" class="demo-form-inline" ref="searchFrom">
                    <el-form-item prop="qa_titel" label="用户账号" style="margin-left: 20px">
                        <el-input v-model="formInline.qa_titel" placeholder="填写用户账号" style="margin-top: 15px"></el-input>
                    </el-form-item>
                    <el-form-item prop="user_nock" label="用户昵称" style="margin-left: 20px">
                        <el-input v-model="formInline.user_nock" placeholder="填写用户昵称" style="margin-top: 15px"></el-input>
                    </el-form-item>
                    <el-form-item prop="user_level" label="会员等级">
                        <el-select v-model="formInline.user_level" placeholder="会员等级" style="margin-top: 15px">
                            <el-option label="普通会员" value="1"></el-option>
                            <el-option label="黄金会员" value="2"></el-option>
                            <el-option label="白金会员" value="3"></el-option>
                            <el-option label="钻石会员" value="4"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item prop="att_status" label="认证状态">
                        <el-select v-model="formInline.att_status" placeholder="认证状态 " style="margin-top: 15px">
                            <el-option label="未认证" value="2"></el-option>
                            <el-option label="已认证" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit()" style="margin-top: 15px">查询</el-button>
                        <el-button @click="resetForm('searchFrom')">重置</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </el-card>
    </div>
    <div id="dataTable">
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span style="font-size: 15px">数据列表</span>
                <el-button style="float: right; padding: 3px 0" type="primary" plain>操作按钮</el-button>
                <el-button style="float: right; padding: 3px 0;margin-right: 10px" type="primary" plain>操作按钮</el-button>
                <el-button style="float: right; padding: 3px 0" type="primary" plain>操作按钮</el-button>
            </div>
            <template >
                <!--  给表格绑定数据，tableData即为后端传过来的数据  -->
                <el-table
                        ref="multipleTable"
                        :data="tableData"
                        border
                        style="width: 100%">
                    <!--  用porp给这一列绑定 tableData中对应的属性 ，type=selection表示这一列是复选框 -->
                    <el-table-column
                            prop="id"
                            type="selection"
                            width="55">
                    </el-table-column>
                    <!--  label="编号"表示这一列的表头是“编号”,width代表这一列宽度 -->
                    <el-table-column
                            prop="id"
                            label="用户ID"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="userName"
                            label="用户账号"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="nockname"
                            label="用户昵称"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="userLevel"
                            label="会员等级"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="attStatus"
                            label="认证状态"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="userInforId2"
                            label="贷款总额"
                            width="80">

                    </el-table-column>

                    <el-table-column
                            prop="inviteUser"
                            label="订单数量"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            prop="bsdUser"
                            label="黑白名单"
                            width="80">
                    </el-table-column>

                    <el-table-column
                            label="是否启用"
                            width="80">
                        <template scope="scope">
                            <el-switch
                                    on-text ="是"
                                    off-text = "否"
                                    on-color="#5B7BFA"
                                    off-color="#dadde5"
                                    v-model="scope.row.status"
                                    @change=change(scope.$index,scope.row)>
                            </el-switch>
                        </template>
                    </el-table-column>

                    <el-table-column
                            label="操作">

                        <template scope="scope">
                            <el-button style="float:left; padding: 3px 0" type="text"
                                       @click=qa_view(scope.row)>查看</el-button>
<!--                            查看的模态框-->

                            <div id="medel_box" >
                                <el-dialog title="用户详情"
                                           :visible.sync="updateDialogFormVisible"
                                           fullscreen
                                           center>
                                    <div>
                                        <el-row type="flex" class="row-bg" justify="space-around">

                                            <el-col :span="6"><div class="grid-content bg-purple">
                                                用户账号：{{name}}
<!--                                             用户等级：{{}}-->
                                            </div></el-col>
                                            <el-col :span="8"><div class="grid-content bg-purple-light">
                                                    用户ID:{{userid}}
                                                <br>
                                                    职业：{{userJob}}
                                                <br>
                                                    昵称：{{nockname}}
                                                <br>
                                                    生日：{{birthday}}
                                            </div></el-col>
                                            <el-col :span="8"><div class="grid-content bg-purple">
                                                    性别：{{gender}}
                                                     <br>
                                                    年龄：{{userAge}}
                                                    <br>
                                                     城市：{{address}}{{addressNow}}
                                                    <br>
                                                     注册时间：{{reateTime}}
                                            </div></el-col>
                                        </el-row>
                                    </div>

<!--                                    用户订单详情-->
                                    <div >

                                        <template >
                                            <!--  给表格绑定数据，tableData即为后端传过来的数据  -->
                                            <el-table
                                                    :data="tableData2"
                                                    border
                                                    style="text-align: center "
                                                    :cell-style="{ textAlign: 'center' }"
                                                    >
                                                <!--  用porp给这一列绑定 tableData中对应的属性 ，type=selection表示这一列是复选框 -->
                                                <el-table-column
                                                        prop="orderNo"

                                                        label="订单编号"
                                                        width="200">
                                                </el-table-column>
                                                <el-table-column
                                                        prop="createTime"
                                                        label="提交时间"
                                                        width="200">

                                                </el-table-column>

                                        <el-table-column
                                                prop="money"
                                                label="贷款金额"
                                                width="200">
                                        </el-table-column>
                                        <el-table-column
                                                prop="status"
                                                label="订单状态"
                                                width="200">
                                        </el-table-column>

<!--                                                查看用户的订单详情-->
                                                <el-table-column
                                                        label="操作">
                                                    <template scope="scope">
                                                        <el-button style="float:left; padding: 3px 0" type="text"
                                                                   @click=qa_vieworder(userid)>查看用户详情</el-button>
                                                <!--  内层 查看订单的模态框-->
                                                        <el-dialog
                                                                fullscreen
                                                                title="信息"
                                                                :visible.sync="UserOrderFormVisible"
                                                                append-to-body>

                                                            <el-collapse >
                                                            <el-collapse-item title="用户基本信息" name="2"  >
                                                                <div>
                                                                    <table border="1px" cellspacing="0px" cellpadding="30px"  align="center">
                                                                        <tr>
                                                                            <th>姓名</th>
                                                                            <th>{{tableData5.name}}</th>
                                                                            <th>身份证号</th>
                                                                            <th>{{tableData5.cardId}}</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>性别</th>
                                                                            <th v-if="tableData5.gender==0">女</th>
                                                                            <th v-if="tableData5.gender==1">男</th>
                                                                            <th>国籍</th>
                                                                            <th>{{tableData5.national}}</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>出生日期</th>
                                                                            <th>{{tableData5.birthday}}</th>
                                                                            <th>年龄</th>
                                                                            <th>{{tableData5.age}}</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>有效期</th>
                                                                            <th>{{tableData5.birthday}}</th>
                                                                            <th>发证机关</th>
                                                                            <th>{{tableData5.validity}}</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>户籍地址</th>
                                                                            <th>{{tableData5.address}}</th>
                                                                            <th>现住址</th>
                                                                            <th>{{tableData5.addressNow}}</th>
                                                                        </tr>

                                                                        <tr>
                                                                            <th>手机号</th>
                                                                            <th>{{tableData5.telphone}}</th>
                                                                            <th>婚姻状况</th>
                                                                            <th v-if="tableData5.marryStatus==0">未婚</th>
                                                                            <th v-if="tableData5.marryStatus==1">已婚</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>教育程度</th>
                                                                            <th>{{tableData5.edu}}</th>
                                                                            <th>政治面貌</th>
                                                                            <th>{{tableData5.politicalStatus}}</th>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>教育程度</th>
                                                                            <th>{{tableData5.edu}}</th>
                                                                            <th>政治面貌</th>
                                                                            <th>{{tableData5.politicalStatus}}</th>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </el-collapse-item>
                                                            </el-collapse>

                                                    <!--  配偶信息-->
                                                            <el-collapse  >

                                                                <el-collapse-item title="配偶基本信息" name="2" @click.native="qa_vieworder2(userid)">
                                                                    <div>
                                                                        <table border="1px" cellspacing="0px" cellpadding="30px"  align="center">
                                                                            <tr>
                                                                                <th>姓名</th>
                                                                                <th>{{tableData4.name}}</th>
                                                                                <th>身份证号</th>
                                                                                <th>{{tableData4.cardId}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>性别</th>
                                                                                <th v-if="tableData4.gender==0">女</th>
                                                                                <th v-if="tableData4.gender==1">男</th>
                                                                                <th>国籍</th>
                                                                                <th>{{tableData4.national}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>出生日期</th>
                                                                                <th>{{tableData4.birthday}}</th>
                                                                                <th>年龄</th>
                                                                                <th>{{tableData4.age}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>有效期</th>
                                                                                <th>{{tableData4.birthday}}</th>
                                                                                <th>发证机关</th>
                                                                                <th>{{tableData4.validity}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>户籍地址</th>
                                                                                <th>{{tableData4.address}}</th>
                                                                                <th>现住址</th>
                                                                                <th>{{tableData4.addressNow}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>手机号</th>
                                                                                <th>{{tableData4.telphone}}</th>
                                                                                <th>婚姻状况</th>
                                                                                <th v-if="tableData4.marryStatus==0">未婚</th>
                                                                                <th v-if="tableData4.marryStatus==1">已婚</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>教育程度</th>
                                                                                <th>{{tableData4.edu}}</th>
                                                                                <th>政治面貌</th>
                                                                                <th>{{tableData4.politicalStatus}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>教育程度</th>
                                                                                <th>{{tableData4.edu}}</th>
                                                                                <th>政治面貌</th>
                                                                                <th>{{tableData4.politicalStatus}}</th>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </el-collapse-item>
                                                            </el-collapse>
                                                            <!--  担保人信息-->
                                                            <el-collapse  >

                                                                <el-collapse-item title="担保人基本信息" name="2" @click.native="qa_vieworder3(userid)">
                                                                    <div>
                                                                        <table border="1px" cellspacing="0px" cellpadding="30px"  align="center">
                                                                            <tr>
                                                                                <th>姓名</th>
                                                                                <th >{{tableData3.name}}</th>
                                                                                <th>身份证号</th>
                                                                                <th>{{tableData3.cardId}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>性别</th>
                                                                                <th v-if="tableData3.gender==0">女</th>
                                                                                <th v-if="tableData3.gender==1">男</th>
                                                                                <th>国籍</th>
                                                                                <th>{{tableData3.national}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>出生日期</th>
                                                                                <th>{{tableData3.birthday}}</th>
                                                                                <th>年龄</th>
                                                                                <th>{{tableData3.age}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>有效期</th>
                                                                                <th>{{tableData3.birthday}}</th>
                                                                                <th>发证机关</th>
                                                                                <th>{{tableData3.validity}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>户籍地址</th>
                                                                                <th>{{tableData3.address}}</th>
                                                                                <th>现住址</th>
                                                                                <th>{{tableData3.addressNow}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>手机号</th>
                                                                                <th>{{tableData3.telphone}}</th>
                                                                                <th>婚姻状况</th>
                                                                                <th v-if="tableData3.marryStatus==0">未婚</th>
                                                                                <th v-if="tableData3.marryStatus==1">已婚</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>教育程度</th>
                                                                                <th>{{tableData3.edu}}</th>
                                                                                <th>政治面貌</th>
                                                                                <th>{{tableData3.politicalStatus}}</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th>教育程度</th>
                                                                                <th>{{tableData3.edu}}</th>
                                                                                <th>政治面貌</th>
                                                                                <th>{{tableData3.politicalStatus}}</th>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </el-collapse-item>
                                                            </el-collapse>

                                                        </el-dialog>
                                                <!-- 查看订单的模态框结束        -->
                                                    </template>

                                                </el-table-column>




                                            </el-table>
                                        </template>

                                    </div>


                                </el-dialog>
                            </div>


                            <el-popconfirm
                                    title="确认删除本条信息？"
                                    @confirm=qa_del(scope.row)>
                                <el-button slot="reference" style="float: left; padding: 3px 0;margin-left: 10px" type="text">删除</el-button>
                            </el-popconfirm>
                        </template>
                    </el-table-column>

                </el-table>
            </template>


        <!--  批量操作-->
            <template>
                <el-select v-model="selected" clearable placeholder="批量操作" style="margin-top: 30px">
                    <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
                <el-popconfirm
                        title="确认批量修改这些信息？"
                        @confirm=mulChannel_opt()>
                    <el-button slot="reference">确定</el-button>
                </el-popconfirm>
            </template>

            <!-- 批量操作结束-->
            <template>
                <div class="block">
                    <!-- size-change绑定的是每页显示数量变化时执行的方法，
                     current-change绑定的是翻页时执行的方法，
                     page-sizes属性中的数组是 “每页显示多少条” 下拉框中的数据，
                     page-size属性时当前显示条数，
                     layout是翻页控件的布局顺序，
                     total绑定的是总共多少条数据-->
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="currentPage"
                            :page-sizes="[10, 20, 30, 40]"
                            :page-size="pageSize"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="total">
                    </el-pagination>
                </div>
            </template>
        </el-card>
    </div>
</div>
<script th:inline="javascript">
    let app = new Vue({
        el:'#main',
        data:{
            //批量操作
            selected:"1",
            options: [{
                value: "1",
                label: '批量启用'
            }, {
                value: "0",
                label: '批量禁用'
            },{
                value: "2",
                label: '批量删除'
            }],


            tableData5:{
                // name:''
            },
            tableData4:{
                // name:''
            },
            tableData3:{
                // name:''
            },

            userInforId1:'',
            userInforId2:'',
            userInforId3:'',

            //用户订单详情的table
            tableData2:[],
            //用户的一系列真实信息
            userAge:'',
            reateTime:'',
            gender:'',
            nockname:'',
            userJob:'',
            userid:'',
            name:'',
            birthday:'',
            addressNow:'',
            address:'',
            //表格数据
            tableData:[],
            //总条数
            pageSize:10,
            //当前页
            currentPage:1,
            total:0,
             formInline: {

                 qa_titel: '',
                 // qa_category: ''
                 user_nock:'',
                 user_level:'',
                 att_status:'',
             },
            updateDialogFormVisible:false,
            UserOrderFormVisible:false
        },

        methods:{

            //批量操作的请求
            mulChannel_opt(){
                let rows=this.$refs.multipleTable.selection;
                let selOpt=this.selected;
                if (selOpt != 2){
                    if (rows.length != 0) {
                        let ids = [];
                        for (let i = 0; i < rows.length; i++) {
                            let row = rows[i];//代表的某一行
                            ids.push(row.id);
                        }
                        axios.put([[@{user/mulOpt/}]]+ids + "/" + selOpt, {
                        }).then(res => {
                        }).catch(error => {
                            console.log(error);
                        })
                        console.log(ids,selOpt);

                        this.$alert('批量操作成功!', '提示', {
                            confirmButtonText: '确定',
                            callback: action => {
                                //将查询到的数据赋给表格中绑定的变量
                                this.getData(this.currentPage);
                            }
                        });
                    }else {
                        this.$message.error('请选择至少一条数据!');
                    }
                }else{
                    //批量删除操作
                    if (rows.length != 0) {
                        let ids = [];
                        for (let i = 0; i < rows.length; i++) {
                            let row = rows[i];//代表的某一行
                            ids.push(row.id);
                        }
                        axios.put([[@{user/delmore/}]]+ids, {
                        }).then(res => {
                        }).catch(error => {
                            console.log(error);
                        })
                        console.log(ids,selOpt);

                        this.$alert('批量操作成功!', '提示', {
                            confirmButtonText: '确定',
                            callback: action => {
                                //将查询到的数据赋给表格中绑定的变量
                                this.getData(this.currentPage);
                            }
                        });
                    }else {
                        this.$message.error('请选择至少一条数据!');
                    }

                }


                },





            //重置普通搜索表单
            resetForm(resetForm) {
                this.$refs[resetForm].resetFields();
            },

            //查看用户的订单详情的时候
            qa_vieworder(id){
                axios.get([[@{user/findinforid}]]+'?id='+id,{
                }).then(res => {

                    this.tableData5=res.data.userInforBean1;

                }).catch(error => {
                    console.log(error);
                })
                this.updateDialogFormVisible = true
                this.UserOrderFormVisible = true

            },
            qa_vieworder2(id){
                axios.get([[@{user/findinforid2}]]+'?id='+id,{
                }).then(res => {

                    this.tableData4=res.data.userInforBean1;
                }).catch(error => {
                    console.log(error);
                })


            },
            qa_vieworder3(id){
                axios.get([[@{user/findinforid3}]]+'?id='+id,{
                }).then(res => {
                       this.tableData3=res.data.userInforBean1;
                }).catch(error => {
                    console.log(error);
                })


            },



            //点击查看时弹出模态框
            qa_view(row){



                //用户数据
                axios.get([[@{user/detail}]]+'?id='+row.userInforId1,{
                }).then(res => {

                    this.userAge=res.data.age
                    this.reateTime=row.reateTime
                    this.name=res.data.name
                     this.address= res.data.address
                    this.birthday= res.data.birthday
                    this.addressNow= res.data.addressNow
                    this.userid=row.id
                    this.userJob=row.job
                    this.nockname=row.nockname
                    this.gender=row.gender
                    if(this.gender === 1){
                        this.gender = "男";
                    }
                    if(this.gender === 0){
                        this.gender = "女";
                    }
                }).catch(error => {
                    console.log(error);
                })


                //用户的订单
                axios.get([[@{user/userorder}]]+'?id='+row.id,{
                }).then(res => {

                    this.tableData2=res.data
                    for(let i = 0 ;i<this.tableData2.length;i++) {
                        if (this.tableData2[i].status === 0) {
                            this.tableData2[i].status = "待审核";
                        }
                        if (this.tableData2[i].status === 1) {
                            this.tableData2[i].status = "待放款";
                        }
                        if (this.tableData2[i].status === 2) {
                            this.tableData2[i].status = "已放款";
                        }
                        if (this.tableData2[i].status === 3) {
                            this.tableData2[i].status = "已完成";
                        }
                        if (this.tableData2[i].status === 4) {
                            this.tableData2[i].status = "无效订单";
                        }
                    }

                }).catch(error => {
                    console.log(error);
                })



                this.updateDialogFormVisible = true;
            },
            //删除时执行的方法
            qa_del(val){
                axios.delete([[@{user/}]]+val.id,{

                }).then(res => {
                    //将查询到的数据赋给表格中绑定的变量
                    this.getData(this.currentPage);
                }).catch(error => {
                    console.log(error);
                })
            },
            //修改状态的请求
            change:function(index,row){
                let now_status = row.status?1:0;
                axios.put([[@{user/status/}]]+row.id+"/"+now_status,{
                }).then(res => {
                    //将查询到的数据赋给表格中绑定的变量
                }).catch(error => {
                    console.log(error);
                })
                console.log(row.id,row.status);
            },
            //向后端发起请求，加载表格内容，传的参数是当前查第几页
            getData(val){
                axios.get([[@{user/list}]],{
                    params:{
                        //每页多少条
                        limit:this.pageSize,
                            //从什么地方开始查
                            offSet:0,
                            //当前查第几页
                            pageNum:val,
                            //排序字段和排序方式
                            sort:"create_time",
                            sortOrder:"desc",
                        //要传属性的继续写在下面
                    }
                }).then(res => {
                    console.info(res)
                    //将查询到的数据赋给表格中绑定的变量
                    this.total = res.data.total;
                    this.tableData = res.data.rows;
                    for(let i = 0 ;i<this.tableData.length;i++){
                        for(let j=0 ;j<this.tableData[i].orderBeanList.length;j++){
                            this.tableData[i].userInforId2 =this.tableData[i].orderBeanList[j].money
                        }
                        for(let j=0 ;j<this.tableData[i].orderBeanList.length;j++){
                            this.tableData[i].inviteUser =this.tableData[i].orderBeanList[j].delFlag
                        }
                        if(this.tableData[i].bsdUser === 1){
                            this.tableData[i].bsdUser = "白名单";
                        }
                        if(this.tableData[i].bsdUser === 0){
                            this.tableData[i].bsdUser = "黑名单";
                        }
                        if(this.tableData[i].userLevel === 1){
                            this.tableData[i].userLevel = "普通会员";
                        }
                        if(this.tableData[i].userLevel === 2){
                            this.tableData[i].userLevel = "黄金会员";
                        }
                        if(this.tableData[i].userLevel === 3){
                            this.tableData[i].userLevel = "白金会员";
                        }
                        if(this.tableData[i].userLevel === 4){
                            this.tableData[i].userLevel = "钻石会员";
                        }
                        if(this.tableData[i].attStatus === 2){
                            this.tableData[i].attStatus = "未认证";
                        }
                        if(this.tableData[i].attStatus === 1){
                            this.tableData[i].attStatus = "已认证";
                        }
                        if(this.tableData[i].status === 1){
                            this.tableData[i].status = true;
                        }
                    }
                }).catch(error => {
                    console.log(error);
                })
            },
            //改变每页显示数据条数时执行的方法
            handleSizeChange(val){
                this.pageSize=val;
                this.currentPage=1;
                this.getData(this.currentPage);
            },
            //翻页时执行的方法
            handleCurrentChange(val) {
                this.currentPage=val;
                this.getData(this.currentPage);
            },
            //修改状态的请求
            change:function(index,row){
                let now_status = row.status?1:0;
                axios.put([[@{user/status/}]]+row.id+"/"+now_status,{

                }).then(res => {
                    //将查询到的数据赋给表格中绑定的变量

                }).catch(error => {
                    console.log(error);
                })
                console.log(index,row);
            },
            //表单提交
            onSubmit() {
                axios.get([[@{user/list}]],{
                    params:{
                        //每页多少条
                        limit:this.pageSize,
                            //从什么地方开始查
                            offSet:0,
                            //当前查第几页
                            pageNum:1,
                            //排序字段和排序方式
                            sort:"create_time",
                            sortOrder:"desc",
                            //要传属性的继续写在下面
                            userName:this.formInline.qa_titel,
                            nockname:this.formInline.user_nock,
                            userLevel:this.formInline.user_level,
                            attStatus:this.formInline.att_status,

                    }
                }).then(res => {

                    //将查询到的数据赋给表格中绑定的变量
                    this.total = res.data.total;
                    this.tableData = res.data.rows;
                    for(let i = 0 ;i<this.tableData.length;i++){
                        for(let j=0 ;j<this.tableData[i].orderBeanList.length;j++){
                            this.tableData[i].userInforId2 =this.tableData[i].orderBeanList[j].money
                        }
                        for(let j=0 ;j<this.tableData[i].orderBeanList.length;j++){
                            this.tableData[i].inviteUser =this.tableData[i].orderBeanList[j].delFlag
                        }
                        if(this.tableData[i].bsdUser === 1){
                            this.tableData[i].bsdUser = "白名单";
                        }
                        if(this.tableData[i].bsdUser === 0){
                            this.tableData[i].bsdUser = "黑名单";
                        }
                        if(this.tableData[i].userLevel === 1){
                            this.tableData[i].userLevel = "普通会员";
                        }
                        if(this.tableData[i].userLevel === 2){
                            this.tableData[i].userLevel = "黄金会员";
                        }
                        if(this.tableData[i].userLevel === 3){
                            this.tableData[i].userLevel = "白金会员";
                        }
                        if(this.tableData[i].userLevel === 4){
                            this.tableData[i].userLevel = "钻石会员";
                        }
                        if(this.tableData[i].attStatus === 2){
                            this.tableData[i].attStatus = "未认证";
                        }
                        if(this.tableData[i].attStatus === 1){
                            this.tableData[i].attStatus = "已认证";
                        }
                        if(this.tableData[i].status === 0){
                            this.tableData[i].status = true;
                        }

                    }
                }).catch(error => {
                    console.log(error);
                })
            },

        },
        //创建时执行查询，查第一页
        created : function () {
            this.getData(1);
        }
    })
    let app3 = new Vue({
        el:"#top"
    })
</script>
</body>
</html>